#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Create by zhang
# Create on 2022/5/21 10:28
import os, sys


# cert_path = os.path.abspath(os.path.dirname(__file__))

# 解决pyinstaller打包python程序可执行文件路径问题
if getattr(sys, 'frozen', False):  # 判断是exe还是.py程序
    cert_path = os.path.dirname(sys.executable)  # exe程序路径
elif __file__:
    cert_path = os.path.dirname(__file__)  # .py程序路径